{% extends "base.html" %}

{% block content %}
<div class="container mt-4">
    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="card">
                <div class="card-header">
                    <h4 class="card-title mb-0">创建订单</h4>
                </div>
                <div class="card-body">
                    <form method="POST">
                        <div class="mb-3">
                            <label class="form-label">客户名称</label>
                            <input type="text" class="form-control" name="customer_name" required>
                        </div>
                        <div class="mb-3">
                            <label class="form-label">联系电话</label>
                            <input type="text" class="form-control" name="customer_phone" required>
                        </div>
                        <div class="mb-3">
                            <label class="form-label">地址</label>
                            <input type="text" class="form-control" name="customer_address" required>
                        </div>
                        <div class="mb-3">
                            <label class="form-label">订单类型</label>
                            <select class="form-select" name="order_type" required>
                                <option value="sample">样本采集</option>
                                <option value="dna">DNA检测</option>
                            </select>
                        </div>
                        <div class="mb-3">
                            <label class="form-label">金额</label>
                            <input type="number" class="form-control" name="total_amount" step="0.01" required>
                        </div>
                        <div class="mb-3">
                            <label class="form-label">备注</label>
                            <textarea class="form-control" name="notes" rows="3"></textarea>
                        </div>
                        <div class="d-grid gap-2">
                            <button type="submit" class="btn btn-primary">创建订单</button>
                            <a href="{{ url_for('order.order_list') }}" class="btn btn-secondary">返回</a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %} 